import request from '../utils/request'

export default {
  login(data) {
    return request({
      url: '/login',
      method: 'post',
      data,
    })
  },
  // 首页数据
  index() {
    return request({
      url: '/Index/index',
      method: 'get'
    })
  },

  // 获取初始化信息
  h5Companion() {
    return request({
      url: '/h5/companion',
      method: 'get'
    })
  },

  // 创建订单
  createOrder(data) {
    return request({
      url: '/createOrder',
      method: 'post',
      data,
    })
  },

  // 订单列表
  getOrderList(params) {
    return request({
      url: '/order/list',
      method: 'get',
      params,
    })
  },

  // 订单详情
  getOrder(params) {
    return request({
      url: '/order/detail',
      method: 'get',
      params
    })
  }
}
